<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich">
 -->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich">

<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Home-Page</title>
</h:head>

<h:body>
<ui:composition template="/pres/index.xhtml">

<ui:define name="toolbar"/>

<ui:define name="corpo">
<center>
		<h:form>
			<rich:dataTable id="jogadores" rows="11" value="#{jogadorManagedBean.jogadores}" var="jogador" border="1">
				<f:facet name="header">
					<h:outputText value="#{msg.jogadores}" />
				</f:facet>
				<rich:column>
					<f:facet name="header">
						<h:commandLink value="#{msg.nome}" actionListener="#{jogadorManagedBean.listarOrder}">
							<f:attribute name="link" value="nome"/>
						</h:commandLink>
					</f:facet>
					<h:outputText value="#{jogador.nome}" />
				</rich:column>
					
				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{msg.dataNasc}" />
					</f:facet>
					<h:outputText value="#{jogador.dataNasc}" />
				</rich:column>
				
				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{msg.tipo}" />
					</f:facet>
					<h:outputText value="#{jogador.tipo}" />
				</rich:column>
				
				<rich:column>
					<f:facet name="header">
						<h:commandLink value="#{msg.preco}" actionListener="#{jogadorManagedBean.listarOrder}">
							<f:attribute name="link" value="preco"/>
						</h:commandLink>
					</f:facet>
					<h:outputText value="#{jogador.preco}" />
				</rich:column>
				
				<rich:column>
					<f:facet name="header">
						<h:commandLink value="#{msg.GF}" actionListener="#{jogadorManagedBean.listarOrder}">
							<f:attribute name="link" value="golsF"/>
						</h:commandLink>
					</f:facet>
					<h:outputText value="#{jogador.golsF}" />
				</rich:column>
				
				<rich:column>
					<f:facet name="header">
						<h:commandLink value="#{msg.GC}" actionListener="#{jogadorManagedBean.listarOrder}">
							<f:attribute name="link" value="golsC"/>
						</h:commandLink>
					</f:facet>
					<h:outputText value="#{jogador.golsC}" />
				</rich:column>
				
				<rich:column>
					<f:facet name="header">
						<h:commandLink value="#{msg.assistencias}" actionListener="#{jogadorManagedBean.listarOrder}">
							<f:attribute name="link" value="assistencia"/>
						</h:commandLink>
					</f:facet>
					<h:outputText value="#{jogador.assistencia}" />
				</rich:column>
				
				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{msg.time}" />
					</f:facet>
					<h:outputText value="#{jogador.time.nome}" />
				</rich:column>
				
				
				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{msg.acao}" />
					</f:facet>
					<h:commandLink actionListener="#{jogadorManagedBean.excluir}">
						<f:attribute name="jogador" value="#{jogador}" />
						<h:graphicImage value="/img/excluir.png" title="#{msg.excluir}" style="border: none" />
					</h:commandLink>
					<h:commandLink action="/adm/jogadorForm?faces-redirect=true">
						<f:setPropertyActionListener value="#{jogador}" target="#{jogadorManagedBean.jogador}" />
						<h:graphicImage value="/img/editar.png" title="#{msg.editar}" style="border: none" />
					</h:commandLink>
				</rich:column>
				
				<f:facet name="footer">
					<rich:dataScroller for="jogadores" maxPages="5"/>
				</f:facet>
			</rich:dataTable>
		</h:form>
	
</center>
</ui:define>

</ui:composition>
</h:body>
</html>